package com.设计模式.observer;

/**
 * @Date 2022/9/7 13:32
 * @Author WangLinBao
 * @Description
 */
public class Client {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData("33", "湿润");
        Weibo weibo = new Weibo();
        weatherData.registerObserver(weibo);
        weatherData.registerObserver(new Baidu());
        weatherData.notifyObservers();
        //移除微博观察者
        weatherData.removeObserver(weibo);
        weatherData.setData("36","新湿度");

    }
}
